from math import sqrt

def isPrime(x):
    for i in range(2, int(sqrt(x)) + 1):
        if x % i == 0:
            return False
    return True




list = []
for i in range(2, 100):
    if isPrime(i) and i < 10:
        list.append(i)
sum = 0
for num in list:
    sum = sum + num
sum = sum * sum
print(sum)